package cn.agiledata.bank.common.service.email;

import java.util.Date;
import java.util.Map;

import cn.agiledata.bank.common.service.NotifyMail;
import cn.agiledata.bank.common.util.DateUtil;
import cn.agiledata.bank.common.util.WeatherUtil;
import cn.agiledata.bank.hibernateBean.ScoresHis;
import cn.agiledata.bank.hibernateBean.SubAccount;
import cn.agiledata.bank.hibernateBean.Transaction;

/**
 * 积分激活短信通知
 * 
 * @author 马贤波
 *
 */
public class ScoreActivateEmail extends NotifyMail {
	
	
	protected SubAccount setMailContext(Map vnvMap, Transaction tran,
			ScoresHis score) {
		SubAccount emailTo = score.getAccount().getDefaultSubAccount();
		String now = DateUtil.date2String(new Date());
		vnvMap.put("activetime", now);
		vnvMap.put("name", WeatherUtil.getNameOrEmailOrMobileByAccount(score
				.getAccount()));
		vnvMap.put("score", score.getScoresAmount().toString());
		vnvMap.put("totalscore", score.getAccount().getTotalScores()
						.toString());
		return emailTo;
	}
}
